package zhangyi.tdd.ecommerce.domain;

import zhangyi.tdd.ecommerce.domain.exception.InvalidAddressException;

public class Address {
    private Country country;

    public Address(Country country) {
        this.country = country;
    }

    public void validate() {
        if (!country.isChina()) {
            throw new InvalidAddressException("Is wrong country");
        }
    }

}
